import request from '@/utils/request'

// 登录
export const getShopBusi = data => {
  return request.get('/shop-busi', data)
}

// 添加店铺基本信息
export const addShopInfo = data => {
  return request.post('/shop-info', data)
}
// 修改店铺基本信息
export const updateShopInfo = (id, data) => {
  return request.put(`/shop-info/${id}`, data)
}

// 获取店铺信息
export const getShopInfo = id => {
  return request.get(`/shop/${id}`)
}

// 个人店铺列表
export const getShopList = data => {
  return request.get('/user-shops', data)
}
// 新增多张店铺图片
export const addShopImage = (shopId, data) => {
  return request.post(`/shop-image/${shopId}`, data)
}
// 新增单张店铺图片
export const addOneShopImage = (shopId, data) => {
  return request.post(`/one-shop-image/${shopId}`, data)
}
// 删除单张店铺图片
export const deleteOneShopImage = shopId => {
  return request.delete(`/one-shop-image/${shopId}`)
}
// 获取店铺图片
export const getShopImage = shopId => {
  return request.get(`/shop-image/${shopId}`)
}

// 更新店铺运输方式
export const updateShopDelivery = (shopId, data) => {
  return request.put(`/shop-delivery/list/${shopId}`, data)
}
// 获取店铺运输方式
export const getShopDelivery = shopId => {
  return request.get(`/shop-delivery/shop/${shopId}`)
}
// 提交审核
export const shopAudit = shopId => {
  return request.put(`/shop-submit-audit/${shopId}`)
}
